//
//  NetworkRequestManager.m
//  万词王
//
//  Created by rimi on 2016/11/29.
//  Copyright © 2016年 dongfumei. All rights reserved.
//

#import "NetworkRequestManager.h"

@implementation NetworkRequestManager

+(void)getMethod:(NSString *)url withParames:(NSDictionary *)parames Success:(RequestSuccess)success Failure:(RequestFailure)failure{
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json",@"text/json",@"text/javascript",@"text/html", nil];
    
    [manager GET:url parameters:parames progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        success(responseObject);
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        failure(error);
    }];
}

@end
